package com.wanmait.teatrain.utils;

public class BusinessException extends RuntimeException {
    private final int code;

    public BusinessException(com.wanmait.teatrain.utils.BusinessCode code) {
        super(code.getMsg());
        this.code = code.getCode();
    }

    public BusinessException(int code, String message) {
        super(message);
        this.code = code;
    }

    public int getCode() { return code; }
}
